/**
 * Filename AdvertiseControllrt.java 2020年12月23日
 * Copyright © Ehome Co.Ltd. All Rgiths Reserved.
 *
 * @author wuyingchao
 */
package com.ehome.poct.base.controller.account;

import com.ehome.core.util.BeanConvertUtil;
import com.ehome.poct.base.api.dto.banner.BannerDTO;
import com.ehome.poct.base.api.dto.banner.BannerDataDTO;
import com.ehome.poct.base.api.dto.banner.BannerPageDTO;
import com.ehome.poct.base.api.dto.doctor.ClinicDTO;
import com.ehome.poct.base.api.virtual.BannerService;
import com.ehome.poct.base.api.virtual.ClinicService;
import com.ehome.poct.base.api.vo.banner.BannerDataVO;
import com.ehome.poct.base.api.vo.banner.BannerDictDataVO;
import com.ehome.poct.base.api.vo.banner.BannerInfoVO;
import com.ehome.poct.base.api.vo.banner.BannerVO;
import com.ehome.poct.base.api.vo.clinic.ClinicVO;
import com.ehome.web.controller.AbstractBaseController;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.github.xiaoymin.knife4j.annotations.ApiSupport;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * 诊所controller
 *
 * @author cq
 * @date 2022/03/15
 **/
@Api(tags = "诊所相关")
@ApiSupport(author = "cq")
@RequestMapping("/clinic")
@RestController
public class ClinicController   {

    @Autowired
    private ClinicService clinicServ;

    /**
     * 通过诊所ID获得诊所信息
     * @param id
     * @return
     */
    @ApiOperation("获取诊所信息")
    @ApiOperationSupport(author = "cq")
    @GetMapping("/getByClinicId/{id}")
    public ClinicDTO getData(@PathVariable Long id) {
       return  BeanConvertUtil.convertBean( clinicServ.getById(id), ClinicDTO.class);

    }
}